<template>
    <div class="goodsDesc-contaiber">
        <h2>{{goodsdesc.title}}</h2>
        <hr>
        <div class="goods-content" v-html="goodsdesc.content"></div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            id: this.$route.params.id,
            goodsdesc: []
        };
    },
    created() {
        this.getdesc();
    },
    methods: {
        // 图文介绍
        getdesc() {
            this.$http.get("api/goods/getdesc/" + this.id).then(result => {
                if (result.body.status === 0) {
                    this.goodsdesc = result.body.message[0];
                }
            });
        }
    }
};
</script>

<style lang="scss" >
.goodsDesc-contaiber {
    h2 {
        font-size: 14px;
        text-align: center;
        margin: 20px 0;
    }
    .goods-content {
        img {
            width: 100%;
            height: auto;
        }
        p {
            img {
                width: 100%;
                height: auto;
            }
        }
    }
}
</style>
